using Wolfpack.Core;
using Wolfpack.Core.Configuration;
using Wolfpack.Core.Interfaces.Entities;

namespace Wolfpack.Contrib.BuildAnalytics.Parsers.NCover
{
    public class NCoverHtmlSummaryReportParserConfigurationDiscovery : PluginDiscoveryBase<NCoverHtmlSummaryReportParserConfig, NCoverHtmlSummaryReportParser>
    {
        protected override NCoverHtmlSummaryReportParserConfig GetConfiguration()
        {
            return new NCoverHtmlSummaryReportParserConfig
                       {
                           Enabled = true,
                           FriendlyId = "CHANGEME!",
                           MatchBuildResult = true, 
                           PublishBranch = true,
                           PublishComplexity = true,
                           PublishMethod = false,
                           PublishSymbol = false,                             
                           TargetHealthCheckName = "The FriendlyId of the check that triggers this parser",
                           ReportFileTemplate = "report file path, supports {buildid} token",
                           ZipFileTemplate = "Report zip filepath (or blank)"
                       };
        }

        protected override void Configure(ConfigurationEntry entry)
        {
            entry.Name = "NCoverHtmlReportParser";
            entry.Description = "When triggered (usually by a successful Build Notification check) this plugin will" +
                                "parse a Html NCover report and create notifications for the test statistics";
            entry.Tags.AddIfMissing(SpecialTags.PUBLISHER, "BuildAnalytics", "NCover");
        }

    }
}